<% layout("/common/layout.html",{"title":"工商变更详情"}){ %>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-8">
        <h2>工商变更列表</h2>
        <ol class="breadcrumb">
            <li><a href="${ctxPath}/admin/main">主页</a></li>
            <li><a href="../view/index">工商变更列表</a></li>
            <li class="active">详情</li>
        </ol>
    </div>
    <div class="col-sm-4">
        <div class="title-action">
            <div class="btn-group">
                <a class="btn btn-primary btn-outline" href="../update/${id}"><i class="fa fa-retweet"> </i> 审核办理</a>
                <a class="btn btn-primary btn-outline" href="../view/index"><i class="fa fa-reply"> </i> 返回列表</a>
            </div>
        </div>
    </div>
</div>

<div class="wrapper wrapper-content">
    <div class="tabs-container" id="tabs-container">
        <ul class="nav nav-tabs">
            <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true"> 基本信息</a></li>
            <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">股东信息</a></li>
            <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">成员信息</a></li>
            <li class=""><a data-toggle="tab" href="#tab-4" aria-expanded="false">审批日志</a></li>
        </ul>
        <div class="tab-content">
            <div id="tab-1" class="tab-pane active">
                <div class="panel-body">
                    <div class="form-horizontal">
                        <div class="form-group">
                            <label class="control-label-info pull-left">原企业名称：</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-4">
                                    <input class="form-control" type="text" value="${companyApply.companyName}" disabled>
                                </div>
                            </div>
                        </div>
                        <%
                        if(companyApply.companyName != companyChange.companyName){
                        %>
                        <div class="form-group">
                            <label class="control-label-info pull-left text-danger">新企业名称：</label>
                            <div class="col-sm-10">
                                <div class="input-group col-sm-4">
                                    <input class="form-control" type="text" value="${companyChange.companyName}" disabled>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label-info pull-left text-danger">新备选字号：</label>
                            <div class="col-sm-10" id="companyBrandList">
                                <%
                                if(isNotEmpty(companyBrandOptionalList)){
                                for(brand in companyBrandOptionalList){
                                %>
                                <div class="input-group col-sm-4 companyBrandList">
                                    <input class="form-control" type="text" value="${companyApply.region}${brand}${companyApply.industry}${companyApply.companyType}" disabled>
                                </div>
                                <% }
                                }
                                %>
                            </div>
                        </div>
                        <%
                        }
                        %>
                        <div class="form-group">
                            <label class="control-label-info pull-left">原注册资本：</label>
                            <div class="col-sm-3">
                                <input name="registeredCapital" class="form-control" type="text" value="${companyApply.registeredCapital}万元" disabled>
                            </div>
                        </div>

                        <%
                        if(companyApply.registeredCapital != companyChange.registeredCapital){
                        %>
                        <div class="form-group">
                            <label class="control-label-info pull-left text-danger">新注册资本：</label>
                            <div class="col-sm-3">
                                <input name="registeredCapital" class="form-control" type="text" value="${companyChange.registeredCapital}万元" disabled>
                            </div>
                        </div>
                        <%
                        }
                        %>

                        <div class="form-group">
                            <label class="control-label-info pull-left">原企业行业：</label>
                            <div class="col-sm-3">
                                <input name="industry" class="form-control" type="text" value="${companyApply.industry}" disabled>
                            </div>
                        </div>

                        <%
                        if(companyApply.industry != companyChange.industry){
                        %>
                        <div class="form-group">
                            <label for="industry" class="control-label-info pull-left text-danger">新企业行业：</label>
                            <div class="col-sm-3">
                                <input id="industry" name="industry" class="form-control" type="text" value="${companyChange.industry}" disabled>
                            </div>
                        </div>
                        <%
                        }
                        %>

                        <div class="form-group">
                            <label class="control-label-info pull-left">原企业类型：</label>
                            <div class="col-sm-3">
                                <input name="companyType" class="form-control" type="text" value="${companyApply.companyType}" disabled>
                            </div>
                        </div>

                        <%
                        if(companyApply.companyType != companyChange.companyType){
                        %>
                        <div class="form-group">
                            <label class="control-label-info pull-left text-danger">新企业类型：</label>
                            <div class="col-sm-3">
                                <input name="companyType" class="form-control" type="text" value="${companyChange.companyType}" disabled>
                            </div>
                        </div>
                        <%
                        }
                        %>

                        <div class="form-group">
                            <label class="control-label-info pull-left">原注册地址：</label>
                            <div class="col-sm-6">
                                <input name="companyAddress" class="form-control" type="text" value="${companyApply.companyAddress}" disabled>
                            </div>
                        </div>

                        <%
                        if(companyApply.companyAddress != companyChange.companyAddress){
                        %>
                        <div class="form-group">
                            <label class="control-label-info pull-left text-danger">新注册地址：</label>
                            <div class="col-sm-6">
                                <input name="companyAddress" class="form-control" type="text" value="${companyChange.companyAddress}" disabled>
                            </div>
                        </div>
                        <%
                        }
                        %>

                        <div class="form-group">
                            <label class="control-label-info pull-left">原经营范围：</label>
                            <div class="col-sm-6">
                                <textarea class="form-control" rows="5" disabled>${companyApply.businessScope}</textarea>
                            </div>
                        </div>

                        <%
                        if(companyApply.businessScope != companyChange.businessScope){
                        %>
                        <div class="form-group">
                            <label class="control-label-info pull-left text-danger">新经营范围：</label>
                            <div class="col-sm-6">
                                <textarea class="form-control" rows="5" disabled>${companyChange.businessScope}</textarea>
                            </div>
                        </div>
                        <%
                        }
                        %>

                        <% if(isNotEmpty(changeImagesList)){ %>
                        <div class="form-group">
                            <label class="control-label-info pull-left">新协议证照：</label>
                            <div class="row col-sm-10" id="businessScopeImage">
                                <% for(image in imagesList){ %>
                                <div class="col-sm-2">
                                    <img src="${uploaderFilesDomain!}${image.img!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <% } %>
                            </div>
                        </div>
                        <% } %>
                    </div>
                </div>
            </div>
            <div id="tab-2" class="tab-pane">
                <div class="panel-body">
                    <% if(isNotEmpty(changeShareholderList)){ %>
                    <h3 class="text text-center">原股东信息</h3>
                    <table class="table table-hover table-bordered bg-warning">
                        <thead>
                        <tr>
                            <th width="8%">姓名</th>
                            <th width="20%">身份</th>
                            <th width="12%">联系方式</th>
                            <th width="10%">出资</th>
                            <th width="12%">证件</th>
                            <th width="25%">证件照</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        if(isNotEmpty(applyShareholderList)){
                        for(shareholder in applyShareholderList){
                        %>
                        <tr>
                            <td>${shareholder.name}</td>
                            <td>${webUtil.memberIdentity(shareholder.identitys)}</td>
                            <td><i class="fa fa-phone-square"></i>&nbsp;${shareholder.phone}<br><i class="fa fa-envelope"></i>&nbsp;${shareholder.email}</td>
                            <td>时间：${shareholder.investmentTime}年 <br> 金额：${shareholder.investmentAmount}万元 <br> 类型：${webUtil.memberInvestmentMode(shareholder.investmentMode)}</td>
                            <td>类型：${decode(shareholder.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br>编号：${shareholder.cardNumber}</td>
                            <td class="IDcard">
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${shareholder.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${shareholder.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                            </td>
                        </tr>
                        <% } }else{ %>
                        <tr>
                            <td colspan="6" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <% } %>
                        </tbody>
                    </table>
                    <hr>
                    <h3 class="text text-danger text-center">新股东信息</h3>
                    <table class="table table-hover table-bordered bg-success">
                        <thead>
                        <tr>
                            <th width="8%">姓名</th>
                            <th width="20%">身份</th>
                            <th width="12%">联系方式</th>
                            <th width="10%">出资</th>
                            <th width="12%">证件</th>
                            <th width="25%">证件照</th>
                        </tr>
                        </thead>
                        <tbody>
                        <% for(shareholder in applyShareholderList){ %>
                        <tr>
                            <td>${shareholder.name}</td>
                            <td>${webUtil.memberIdentity(shareholder.identitys)}</td>
                            <td><i class="fa fa-phone-square"></i>&nbsp;${shareholder.phone}<br><i class="fa fa-envelope"></i>&nbsp;${shareholder.email}</td>
                            <td>时间：${shareholder.investmentTime}年 <br> 金额：${shareholder.investmentAmount}万元 <br> 类型：${webUtil.memberInvestmentMode(shareholder.investmentMode)}</td>
                            <td>类型：${decode(shareholder.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br>编号：${shareholder.cardNumber}</td>
                            <td class="IDcard">
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${shareholder.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${shareholder.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                            </td>
                        </tr>
                        <% } %>
                        </tbody>
                    </table>
                    <% }else{ %>
                    <h5 class="text-center text-muted">暂无数据</h5>
                    <% } %>
                </div>
            </div>

            <div id="tab-3" class="tab-pane">
                <div class="panel-body">
                    <h3 class="text text-center">原成员信息</h3>
                    <table class="table table-hover table-bordered bg-warning">
                        <thead>
                        <tr>
                            <th width="10%">身份</th>
                            <th width="18%">姓名</th>
                            <th width="18%">联系方式</th>
                            <th width="18%">证件</th>
                            <th width="25%">证件照</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        if(isNotEmpty(applyMemberList)){
                        for(memeber in applyMemberList){
                        //法人和代办人
                        if(memeber.identity == 4 || memeber.identity == 7){
                        %>
                        <tr>
                            <td>${webUtil.memberIdentity(memeber.identity+'')}</td>
                            <td>${memeber.name}</td>
                            <td><i class="fa fa-phone-square"></i>&nbsp;${memeber.phone}<br><i class="fa fa-envelope"></i>&nbsp;${memeber.email}</td>
                            <td>类型：${decode(memeber.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br/>编号：${memeber.cardNumber}</td>
                            <td class="IDcard">
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${memeber.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${memeber.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                            </td>
                        </tr>
                        <% } } }else{ %>
                        <tr>
                            <td colspan="5" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <% } %>
                        </tbody>
                    </table>
                    <hr>
                    <h3 class="text text-center text-danger">新成员信息</h3>
                    <table class="table table-hover table-bordered bg-success">
                        <thead>
                        <tr>
                            <th width="10%">身份</th>
                            <th width="18%">姓名</th>
                            <th width="18%">联系方式</th>
                            <th width="18%">证件</th>
                            <th width="25%">证件照</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        if(isNotEmpty(changeMemberList)){
                        for(memeber in changeMemberList){
                        //法人和代办人
                        if(memeber.identity == 4 || memeber.identity == 7){
                        %>
                        <tr>
                            <td>${webUtil.memberIdentity(memeber.identity+'')}</td>
                            <td>${memeber.name}</td>
                            <td><i class="fa fa-phone-square"></i>&nbsp;${memeber.phone}<br><i class="fa fa-envelope"></i>&nbsp;${memeber.email}</td>
                            <td>类型：${decode(memeber.cardType,1,'身份证',2,'营业执照',3,'其他有效证件')}<br/>编号：${memeber.cardNumber}</td>
                            <td class="IDcard">
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${memeber.cardFrontPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                                <div class="col-sm-6">
                                    <img src="${uploaderFilesDomain!}${memeber.cardBackPicture!'/static/images/nopic.jpg'}" class="img-thumbnail" title="点击查看大图" alt="点击查看大图">
                                </div>
                            </td>
                        </tr>
                        <% } } }else{ %>
                        <tr>
                            <td colspan="5" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <% } %>
                        </tbody>
                    </table>




                </div>
            </div>
            <div id="tab-4" class="tab-pane">
                <div class="panel-body">
                    <table class="table table-hover table-bordered">
                        <thead>
                        <tr>
                            <th width="11%">审批人</th>
                            <th width="11%">审批时间</th>
                            <th width="8%">状态</th>
                            <th width="70%">建议</th>
                        </tr>
                        </thead>
                        <tbody>
                        <%
                        if(isNotEmpty(flowProcessList)){
                        for(process in flowProcessList){
                        %>
                        <tr>
                            <td>${process.auditorNickName} / ${process.auditorUserName}</td>
                            <td class="text text-center">${process.updateTime,"yyyy-MM-dd HH:mm:ss"}</td>
                            <td>${webUtil.companyItemStatus(process.auditStatus!0)}</td>
                            <td>${process.message}</td>
                        </tr>
                        <%
                        }
                        }else{
                        %>
                        <tr>
                            <td colspan="4" class="text-center text-muted">暂无数据</td>
                        </tr>
                        <%
                        }
                        %>
                        </tbody>
                    </table>
                </div>
            </div>

        </div>

    </div>
</div>

<% } %>
<script type="text/javascript">
    //页面JS调用
    require(['company/apply'], function (apply) {
        apply.view();
    });
</script>
